﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="WGRUS-Widget" targetNamespace="http://tempuri.org/WGRUS-Widget.xsd" xmlns:mstns="http://tempuri.org/WGRUS-Widget.xsd" xmlns="http://tempuri.org/WGRUS-Widget.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="WGRUS_widgetConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="WGRUS_widgetConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.WidgetApplication.Properties.Settings.GlobalReference.Default.WGRUS_widgetConnectionString" Provider="System.Data.SqlClient" />
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ItemTableAdapter" GeneratorDataComponentClassName="ItemTableAdapter" Name="Item" UserDataComponentName="ItemTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="WGRUS_widgetConnectionString (Settings)" DbObjectName="[WGRUS-widget].dbo.Item" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>DELETE FROM [dbo].[Item] WHERE (([Id] = @Original_Id) AND ([ItemId] = @Original_ItemId) AND ((@IsNull_Desc = 1 AND [Desc] IS NULL) OR ([Desc] = @Original_Desc)) AND ([Price] = @Original_Price) AND ([StockAmount] = @Original_StockAmount) AND ([StockLocation] = @Original_StockLocation))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Id" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_ItemId" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="ItemId" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_Desc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Desc" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_Desc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Desc" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Currency" Direction="Input" ParameterName="@Original_Price" Precision="0" ProviderType="Money" Scale="0" Size="0" SourceColumn="Price" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Original_StockAmount" Precision="18" ProviderType="Decimal" Scale="0" Size="0" SourceColumn="StockAmount" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_StockLocation" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="StockLocation" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>INSERT INTO [dbo].[Item] ([ItemId], [Desc], [Price], [StockAmount], [StockLocation]) VALUES (@ItemId, @Desc, @Price, @StockAmount, @StockLocation);
SELECT Id, ItemId, [Desc], Price, StockAmount, StockLocation FROM Item WHERE (Id = SCOPE_IDENTITY())</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@ItemId" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="ItemId" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Desc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Desc" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Currency" Direction="Input" ParameterName="@Price" Precision="0" ProviderType="Money" Scale="0" Size="0" SourceColumn="Price" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@StockAmount" Precision="18" ProviderType="Decimal" Scale="0" Size="0" SourceColumn="StockAmount" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@StockLocation" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="StockLocation" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>SELECT Id, ItemId, [Desc], Price, StockAmount, StockLocation FROM dbo.Item</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>UPDATE [dbo].[Item] SET [ItemId] = @ItemId, [Desc] = @Desc, [Price] = @Price, [StockAmount] = @StockAmount, [StockLocation] = @StockLocation WHERE (([Id] = @Original_Id) AND ([ItemId] = @Original_ItemId) AND ((@IsNull_Desc = 1 AND [Desc] IS NULL) OR ([Desc] = @Original_Desc)) AND ([Price] = @Original_Price) AND ([StockAmount] = @Original_StockAmount) AND ([StockLocation] = @Original_StockLocation));
SELECT Id, ItemId, [Desc], Price, StockAmount, StockLocation FROM Item WHERE (Id = @Id)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@ItemId" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="ItemId" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Desc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Desc" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Currency" Direction="Input" ParameterName="@Price" Precision="0" ProviderType="Money" Scale="0" Size="0" SourceColumn="Price" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@StockAmount" Precision="18" ProviderType="Decimal" Scale="0" Size="0" SourceColumn="StockAmount" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@StockLocation" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="StockLocation" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Id" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_ItemId" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="ItemId" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_Desc" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Desc" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_Desc" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Desc" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Currency" Direction="Input" ParameterName="@Original_Price" Precision="0" ProviderType="Money" Scale="0" Size="0" SourceColumn="Price" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Original_StockAmount" Precision="18" ProviderType="Decimal" Scale="0" Size="0" SourceColumn="StockAmount" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_StockLocation" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="StockLocation" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="Id" ColumnName="Id" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="ItemId" DataSetColumn="ItemId" />
              <Mapping SourceColumn="Desc" DataSetColumn="Desc" />
              <Mapping SourceColumn="Price" DataSetColumn="Price" />
              <Mapping SourceColumn="StockAmount" DataSetColumn="StockAmount" />
              <Mapping SourceColumn="StockLocation" DataSetColumn="StockLocation" />
            </Mappings>
            <Sources>
              <DbSource ConnectionRef="WGRUS_widgetConnectionString (Settings)" DbObjectName="[WGRUS-widget].dbo.Item" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="FillByItemId" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetDataByItemId" GeneratorSourceName="FillByItemId" GetMethodModifier="Public" GetMethodName="GetDataByItemId" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataByItemId" UserSourceName="FillByItemId">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT Id, ItemId, [Desc], Price, StockAmount, StockLocation FROM dbo.Item
Where ItemId = @ItemId</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="ItemId" ColumnName="ItemId" DataSourceName="[WGRUS-widget].dbo.Item" DataTypeServer="nvarchar(20)" DbType="String" Direction="Input" ParameterName="@ItemId" Precision="0" ProviderType="NVarChar" Scale="0" Size="20" SourceColumn="ItemId" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </Sources>
          </TableAdapter>
        </Tables>
        <Sources />
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="WGRUS-Widget" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="_WGRUS_Widget" msprop:Generator_UserDSName="WGRUS-Widget">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="Item" msprop:Generator_TableClassName="ItemDataTable" msprop:Generator_TableVarName="tableItem" msprop:Generator_RowChangedName="ItemRowChanged" msprop:Generator_TablePropName="Item" msprop:Generator_RowDeletingName="ItemRowDeleting" msprop:Generator_RowChangingName="ItemRowChanging" msprop:Generator_RowEvHandlerName="ItemRowChangeEventHandler" msprop:Generator_RowDeletedName="ItemRowDeleted" msprop:Generator_RowClassName="ItemRow" msprop:Generator_UserTableName="Item" msprop:Generator_RowEvArgName="ItemRowChangeEvent">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnPropNameInTable="IdColumn" msprop:Generator_UserColumnName="Id" type="xs:int" />
              <xs:element name="ItemId" msprop:Generator_ColumnVarNameInTable="columnItemId" msprop:Generator_ColumnPropNameInRow="ItemId" msprop:Generator_ColumnPropNameInTable="ItemIdColumn" msprop:Generator_UserColumnName="ItemId">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Desc" msprop:Generator_ColumnVarNameInTable="columnDesc" msprop:Generator_ColumnPropNameInRow="Desc" msprop:Generator_ColumnPropNameInTable="DescColumn" msprop:Generator_UserColumnName="Desc" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Price" msprop:Generator_ColumnVarNameInTable="columnPrice" msprop:Generator_ColumnPropNameInRow="Price" msprop:Generator_ColumnPropNameInTable="PriceColumn" msprop:Generator_UserColumnName="Price" type="xs:decimal" />
              <xs:element name="StockAmount" msprop:Generator_ColumnVarNameInTable="columnStockAmount" msprop:Generator_ColumnPropNameInRow="StockAmount" msprop:Generator_ColumnPropNameInTable="StockAmountColumn" msprop:Generator_UserColumnName="StockAmount" type="xs:decimal" />
              <xs:element name="StockLocation" msprop:Generator_ColumnVarNameInTable="columnStockLocation" msprop:Generator_ColumnPropNameInRow="StockLocation" msprop:Generator_ColumnPropNameInTable="StockLocationColumn" msprop:Generator_UserColumnName="StockLocation">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Item" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
  </xs:element>
</xs:schema>